package day020;

import java.io.*;

public class BufferedStreamDemo1 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("D:\\day020\\input.txt"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("D:\\day020\\input_copy.txt"));

        int ch;
        while ((ch = br.read()) != -1) {
            bw.write(ch);
        }

        char[] chs = new char[1024];
        int len;
        while ((len = br.read(chs)) != -1) {
            bw.write(chs, 0, len);
        }

        br.close();
        bw.close();
    }
}
